-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cDAC] SOSDacImpl::GetMethodDescData DynamicMethodObject #110545
Conversation
Tagging subscribers to this area: @tommcdon |
@@ -405,7 +405,8 @@ int ISOSDacInterface.GetMethodDescData(ulong methodDesc, ulong ip, DacpMethodDes | |||
Debug.Assert(data->MDToken == dataLocal.MDToken); | |||
Debug.Assert(data->GCInfo == dataLocal.GCInfo); | |||
Debug.Assert(data->GCStressCodeCopy == dataLocal.GCStressCodeCopy); | |||
Debug.Assert(data->managedDynamicMethodObject == dataLocal.managedDynamicMethodObject); | |||
// managedDynamicMethodObject is not currently populated by the cDAC API and may differ from legacyImpl. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the managedDynamicMethodObject field actually zero'ed? I don't see it anywhere. I'm not sure if you should rely on the client to zero it (like in dacprivate.h). It may not be enough i.e. CLRMD doesn't use that include file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I wasn't sure if the return memory region would be zero'd to begin with, but that makes sense. I'll zero out the field to make sure it is always returned with 0
.
/ba-g Build analysis blocked by #110285 |
* allow SOSDacImpl::GetMethodDescData to handle dynamic functions * zero-out managedDynamicMethodObject as it is not being used and cDAC does not yet support fetching managed fields
Contributes to #109426
Previously the cDAC version of
GetMethodDescData
would throw if a method is dynamic because fetching themanagedDynamicMethodObject
was not supported. ThemanagedDynamicMethodObject
is a small portion of the returned information for dynamic methods and is unused in both SOS and CLRMD.Since it is a relatively large lift to access this field (on a CorLib bound managed object) I believe it is reasonable to leave this field blank for now. Due to compatibility with the legacy implementation we need to keep the return object the same so the field is zero'd out.